package org.eenie.learn.seedquartz.controllers;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.*;

import java.util.Map;

public interface TicketApi {



    @GET("/ST9ZHHXAPP/home/index")
    @Headers({"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) MicroMessenger/2.3.26(0x12031a10) MacWechat NetType/WIFI WindowsWechat"})
    Observable<ResponseBody> getIndex();


    @POST("/ST9ZHHXAPP/ShipTicket/shipList/ListShip")
    @FormUrlEncoded
    Observable<ResponseBody> setTargetTicket(@HeaderMap Map<String, String> header, @Field("startstation") String startstation, @Field("endstation") String endstation, @Field("startTime") String startTime);



    @POST("/ST9ZHHXAPP/ShipTicket/shipList/ListShip")
    @FormUrlEncoded
    Observable<ResponseBody> fetchTicketState(@HeaderMap Map<String, String> header,@Field("date") String date);


    @GET("/ST9ZHHXAPP/ShipTicket/shipSeat/Index")
    Observable<ResponseBody> fetchTicketInfo(@HeaderMap Map<String, String> header,@Query("busid") String busid, @Query("ttype") String ttype);


    @POST("/ST9ZHHXAPP/ShipTicket/shipSeat/makeship3")
    @FormUrlEncoded
    Observable<ResponseBody> submit(@HeaderMap Map<String, String> header,@Field("jsonstr") String jsonstr, @Field("insProductPrice") int insProductPrice, @Field("insProductID") String insProductID);


    @POST("https://sc.ftqq.com/{key}.send")
    @FormUrlEncoded
    Observable<ResponseBody> sendToWx(@Path("key") String key, @Field("text") String text, @Field("desp") String desp);


}
